<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title><spring:message code="title.login" /></title>
</head>
<SCRIPT language=JavaScript type=text/javascript>

	//test the username element of a form and correct it if it's oracle or fail
	function isValidUsername(form){
	alert('Hi - '+form.userName.value);
	if (form.userName.value == "") {
        alert('Please enter a Username.');
        form.username.focus();
        return false;
	}
	return true;
	}
	
	//perform a login for the LoginForm
	function doLogin(form) {
	alert('Hi - doLogin');
    //test username
    if (!isValidUsername(form)) {
        return;
    }
    form.submit();
    }
	</SCRIPT>
<body>
<jsp:include flush="true" page="/WEB-INF/jsp/header.jsp"></jsp:include>
<form:form name="LoginForm" method="POST"
	action="<c:url value='j_spring_security_check'/>">
	<TABLE border=0 cellSpacing=30 cellPadding=6 width=800 align=center>
		<TBODY>
			<TR>
				<TD id=signIn vAlign=top width="50%" class="TableBigBox"><SPAN
					class=signinhead><img
					src="<spring:theme code="login.logo"/>" alt="" align="top"
					width="20" height="20">Sign In</SPAN><BR>
				<TABLE border=0 cellSpacing=0 cellPadding=0 width="100%">
					<TBODY>
						<TR>
							<TD>
							<TABLE border=0 cellSpacing=2 cellPadding=4 width="100%">
								<TBODY>
									<TR>
										<TD height=25 colSpan=2 noWrap><SPAN class=txtnormal>Please
										enter your user name and password.</SPAN></TD>
									</TR>
									<tr>
										<td align=right valign="middle" class="txtnormal">Username&nbsp;&nbsp;</td>
										<td height="27" align=left valign="top" class="txtnormal">
										<input type="text" name="j_username" size="20" maxlength="80"
											value=""></td>
									</tr>
									<tr>
										<td align=right valign="middle" height="27"><span
											class="txtnormal">Password&nbsp;&nbsp;</span></td>
										<td align=left valign="top" class="txtnormal" height="27">
										<input type="password" name="j_password" value="" size="20"
											maxlength="255"> <a
											href="javascript:doLogin(document.LoginForm);"
											onMouseOver="self.status='Press Go to Sign In'; return true">
										<img src="<spring:theme code="go.logo"/>" border=0
											alt="Sign In" align="middle"> </a></td>
									</tr>

									<tr>
										<td class="invalidcredentials"><spring:message
											code="${message}" text="" />
									</tr>
									<TR>
										<TD height=43 colSpan=2><A class=urllink
											href="Lost Password Link" target=new>Lost Password?</A> <BR>
										<A class=urllink href="Lost User Name Link" target=new>Lost
										Username?</A> <BR>
									</TR>
								</TBODY>
							</TABLE>
							</TD>
						</TR>
					</TBODY>
				</TABLE>
				</TD>
				<TD id=signIn vAlign=top width="50%" class="TableBigBox"><SPAN
					class=signinhead>Why Sign In?</SPAN><BR>
				<TABLE border=0 cellSpacing=2 cellPadding=4 width="100%">
					<TBODY>
						<TR>
							<TD class=txtnormal bgColor=#ffffff height=26 vAlign=top
								colSpan=2>Sign in to access your account profile
							information.</TD>
						</TR>
						<TR>
							<TD>
							<UL class=txtnormal>
								<LI>Upload your documents/CV to our searchable database.</LI>
								<LI>Share or download them from anywhere, anytime.</LI>
							</UL>
							</TD>
						</TR>
						<TR>
							<TD><SPAN class=txtnormal><A class=boldurllink
								href=<spring:message code="link.newuser" />>Create your
							account now.</A></SPAN></TD>
						</TR>
					</TBODY>
				</TABLE>
				</TD>
			</TR>
		</TBODY>
	</TABLE>
</form:form>

</body>
</html>